worker-protocol: add cancelled-and-hash-mismatch-status feature#15090
worker-protocol: add cancelled-and-hash-mismatch-status feature#15090amaanq wants to merge 1 commit intoNixOS:masterfrom
Conversation
7c26fed to
145c623
Compare
Ericson2314
left a comment
There was a problem hiding this comment.
Please make a first PR that just introduces ExitStatusFlags (and does the things I mention below). Then we'll return to this one for the actual wire protocol changes using it.
|
🎉 All dependencies have been resolved ! |
d2623b4 to
0c5cd3b
Compare
0c5cd3b to
5956f56
Compare
556da11 to
e4dbc59
Compare
f48542e to
9b369ca
Compare
| * Build result. | ||
| */ | ||
| BuildResult buildResult; | ||
| BuildResult buildResult = {.inner = BuildResult::Failure{BuildResult::Failure::Cancelled, ""}}; |
There was a problem hiding this comment.
N.B. tempted to just change the default status on BuildResult itself, rather than here.
377a372 to
e7bf1b1
Compare
| /// Goal was never attempted because another goal failed (and | ||
| /// `--keep-going` wasn't used). Requires the | ||
| /// `cancelled-and-hash-mismatch-status` feature; falls back to | ||
| /// `MiscFailure` when communicating with older remotes. | ||
| Cancelled, |
There was a problem hiding this comment.
This should also handle Interrupted cases right?
There was a problem hiding this comment.
I added the comment based on Eelco's PR description, I don't think handling Interrupted would make sense since it's not a BuildResult status but rather its own error that occurs on SIGINT, SIGTERM, and SIGHUP.
939aa89 to
c948def
Compare
0f6f3a6 to
abd4ec8
Compare
abd4ec8 to
0b8349c
Compare
07159e7 to
d093bed
Compare
|
I think this is pretty good, what needs to happen next is that the build trace rework docs release (which should perhaps be renamed?) is updated again to cover these protocol changes in addition to the others. |
dbdeccd to
4c04b6c
Compare
This commit adds a `cancelled-and-hash-mismatch-status` protocol feature that gates two new `BuildResult` failure statuses: `HashMismatch` (a specific type of `OutputRejected` for hash mismatches) and `Cancelled` (for goals never attempted because another goal failed without `--keep-going`). Goals now default to `Cancelled` status instead of `MiscFailure`. When communicating with older remotes, `HashMismatch` falls back to `OutputRejected` and `Cancelled` falls back to `MiscFailure`. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
4c04b6c to
70cd12c
Compare
Motivation
This commit adds a
cancelled-and-hash-mismatch-statusprotocol feature that gates two newBuildResultfailure statuses:HashMismatch(a specific type ofOutputRejectedfor hash mismatches) andCancelled(for goals never attempted because another goal failed without--keep-going). Goals now default toCancelledstatus instead ofMiscFailure. When communicating with older remotes,HashMismatchfalls back toOutputRejectedandCancelledfalls back toMiscFailure.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.